package 创建者模式.工厂模式.简单工厂模式.静态工厂;

public class CoffeeStore {
    public Coffee orderCoffee(String type){
//        CoffeeFactory factory=new CoffeeFactory();
//        //调用生产咖啡的方法
//        Coffee coffee=factory.creatCoffee(type);
        Coffee coffee=CoffeeFactory.creatCoffee(type);//可以避免创建很多工厂对象

        coffee.addMilk();
        coffee.addSugar();

        return coffee;
    }

}
